package com.eastfair.venuebooking.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.mapper.SuperMapper;
import com.eastfair.boot.request.PageParams;
import com.eastfair.venuebooking.dto.SpacePageQuery;
import com.eastfair.venuebooking.entity.CustomerMain;
import com.eastfair.venuebooking.entity.Space;

import com.eastfair.venuebooking.vo.SpaceVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 场地表
 * </p>
 *
 * @author linan
 * @date 2022-06-08
 */
@Repository
public interface SpaceMapper extends SuperMapper<Space> {


    /**
     * 查询展厅列表
     * @param page,queryWrapper
     * @return
     */
    Page<SpaceVO> querySpaceList(IPage<Space> page,
                                 @Param(Constants.WRAPPER) QueryWrapper<Space> queryWrapper);



    Integer delSpaceInfoById(@Param("tenantId") Long tenantId, @Param("id") Long id);

    /**
     * 查询场地的所有标签.
     *
     * @return the list
     */
    @Select("SELECT DISTINCT tag FROM vb_space WHERE is_deleted = 0")
    List<String> listTags();
}
